import java.util.*;

public class TheOlympiadInInformatics {

	
	private boolean check(int x) {
		long res = 0;
		for (int i=0; i<sums.length; i++) {
			res += sums[i]/(x+1);
		}
		return res<= k;
	}
	
	int k;
	int[] sums;
	public int find(int[] sums, int k) {
		this.k = k;
		this.sums = sums;
		Arrays.sort(sums);
		if (check(0)) return 0;
		int lo = 0, hi = 1000000001;		
			
		while (hi - lo > 1) {
			int m = (lo+hi)/2;
			if (check(m)) hi = m;
			else lo = m;
		}
		
		return hi;
	}

}
